{template Public:Page:header}

<div class="container">
  {if $task['draft_success']>0}
       <div class="row">
         <div class="well">
         {if $task['task_number']>1}
             {template Task:Show:publicnumber} 
         {else}    
         	{template Task:Show:publicdraft} 
         {/if}     
         </div>
       </div>
  {/if}
  
  <div class="row">
    <div class="col-lg-9">
      <div class="row">
        <div class="well">
        {if $task['task_mode']==1 && $task['task_number']>1}  
             {template Task:Show:number}
        {else}
             {template Task:Show:reward}
        {/if}
          
          <div class="row">
          <div class="col-lg-12 col-pt-10">
          	<p>需求编号：{echo $task['id']}</p>

               <p>任务注度：{echo $task['show_number']}</p>
               
               
               <p>发布日期：{echo $task['adddate']}</p>
               
          		<p>任务需求：</p>
                {if $task['hidetask'] && !$uid}
          		    <div class="alert alert-warning fade in"><button class="close" data-dismiss="alert">×</button><i class="fa-fw fa fa-warning"></i><strong>提示</strong> 该内容已隐藏,登录后可见!</div>
                {else}
                    {echo htmlspecialchars_decode($task['content'])}
                {/if}
                 
               {if $taskfile && ($uid==$order['seller_uid']||$uid==$order['buyer_uid'])}
               <p>附件下载：</p>
            	   {foreach $taskfile $file}
                  	  <p><a href="/post/download/file/{echo $file['fid']}" target="_blank"><i class="glyphicon glyphicon-save"></i> {echo $file['filename']}</a></p>
                 	{/foreach}
               {/if}
               
               
               {if $task['longitude'] && $task['latitude']}
                 <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
                 <div id="MyMap"></div>
                 <script type="text/javascript">
                      var mymap = new BMap.Map("MyMap"); 
                      mymap.enableScrollWheelZoom(); 
                      mypoint = new BMap.Point({echo $task["longitude"]},{echo $task["latitude"]});
                      mymap.centerAndZoom(mypoint,{if intval($task["mapzoom"])<1}10{else}{echo $task["mapzoom"]}{/if});                
                      window.setTimeout(function(){mymap.panTo(mypoint);}, 2000);
                      var mymarker = new BMap.Marker(mypoint); 
                      mymap.addOverlay(mymarker); 
                      mymap.addControl(new BMap.NavigationControl()); 
                      $('#MyMap').css('height',220).css('width','auto');
                      
                 </script>
                {/if}
               
          </div>
          </div>
          
        </div>
        
          {if $uid!=$task['uid']} 
             <div class="well">
          <div class="row">
          <div class="col-lg-12">
          	{template Task:Show:postdraft}
          </div>
          </div>
          </div>
          {/if}
          
          <div class="tabbable">
                <ul id="myTab11" class="nav nav-tabs tabs-flat">
                    <li class="active">
                        <a href="#DraftA11" data-toggle="tab" onclick="GetListDraft('{echo U('/post/task/listdraft/id/'.$id.'/type/0/oid/'.$oid)}','#ListDraft');">
                            全部稿件({echo $task['draft_number']})
                        </a>
                    </li>
                    <li>
                         <a href="#DraftNotreviewed" data-toggle="tab" onclick="GetListDraft('{echo U('/post/task/listdraft/id/'.$id.'/type/1/oid/'.$oid)}','#ListDraftNotreviewed');">
                            未审核({echo $task['draft_notreviewed']})
                        </a>
                    </li>
                     <li>
                        <a href="#DraftSuccess" data-toggle="tab" onclick="GetListDraft('{echo U('/post/task/listdraft/id/'.$id.'/type/2/oid/'.$oid)}','#ListDraftSuccess');">
                            中标({echo $task['draft_success']}) 
                        </a>
                    </li>
                    
                    <li>
                        <a href="#DraftFailure" data-toggle="tab" onclick="GetListDraft('{echo U('/post/task/listdraft/id/'.$id.'/type/3/oid/'.$oid)}','#ListDraftFailure');">
                            失败({echo $task['draft_failure']})
                        </a>
                    </li>
                    
                     <li>
                        <a href="#TaskMessage" data-toggle="tab">
                            任务留言({echo $task['message_number']})
                        </a>
                    </li>

                </ul>
                
                
                 <div class="tab-content tabs-flat" style="padding:0px;margin:0px;">
                    <div class="tab-pane active" id="DraftA11">
                    <div class="well">
                        <div class="row">
                          <div class="col-lg-12" id="ListDraft">
                          加载中...
                           </div>
                        </div>
                        </div>  
                    </div>

                    <div class="tab-pane" id="DraftNotreviewed">
                        <div class="well">
                            <div class="row">
                              <div class="col-lg-12" id="ListDraftNotreviewed">
                              加载中...
                               </div>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="DraftSuccess">
                   		<div class="well">
                            <div class="row">
                              <div class="col-lg-12" id="ListDraftSuccess">
                              加载中...
                               </div>
                            </div>
                        </div> 
                    </div>
                    <div class="tab-pane" id="DraftFailure">
                    	<div class="well">
                            <div class="row">
                              <div class="col-lg-12" id="ListDraftFailure">
                              加载中...
                               </div>
                            </div>
                        </div> 
                    </div>
                    <div class="tab-pane" id="TaskMessage">
                    
                    <div class="well">
                            <div class="row">
                              <div class="col-lg-12">
                              	<h5>任务留言 (200字内)</h5>
                                <div id="ListMessage"></div>
                                <div class="dataTables_paginate paging_bootstrap text-right" id="ListMessagePage"></div>
                                <div>
                                <textarea placeholder="留言内容" rows="3" class="form-control" id="DataMessage"></textarea>
                                </div>
                                <div class="col-pt-10">
                                <button class="btn btn-palegreen" type="submit" onclick="SubmitDataMessage({echo $id})">提交</button>
                           		</div>
                                                    
                               </div>
                            </div>
                        </div> 
                    
                    </div>
                </div>
                                       
        </div>
                            
        <div class="dataTables_paginate paging_bootstrap text-right" id="ShowPage"></div>
          
          <!-- 稿件列表 -->
         {template Task:Show:listdraft}
          
      </div>
    </div>
    <div class="col-lg-3 well-col-pl-30">
      <div class="row">
       
        
	         <div class="databox radius-bordered databox-shadowed databox-graded">
                                        <div class="databox-left bg-azure">
                                            <div class="databox-piechart">
                                                <div data-trackcolor="#7fe2fa" data-size="47" data-linewidth="3" data-animate="500" data-percent="100" data-linecap="butt" data-barcolor="#fff" class="easyPieChart" data-toggle="easypiechart" style="width: 47px; height: 47px; line-height: 47px;"><span class="white"><h3>￥</h3></span><canvas height="47" width="47"></canvas></div>
                                            </div>
                                        </div>
                                        <div class="databox-right">
                                            <span class="databox-number azure">担保交易</span>
                                            <div class="databox-text darkgray">满意后再付款,质量保证！</div>
                                            <div class="databox-state bg-azure">
                                                <i class="fa fa-check"></i>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    
                 <div class="databox radius-bordered databox-shadowed databox-graded">
                                        <div class="databox-left bg-palegreen">
                                            <div class="databox-piechart">
                                                <div data-trackcolor="#fa8872" data-size="47" data-linewidth="3" data-animate="500" data-percent="50" data-linecap="butt" data-barcolor="#fff" class="easyPieChart" data-toggle="easypiechart" style="width: 47px; height: 47px; line-height: 47px;"><span class="white"><h3>保</h3></span><canvas height="47" width="47"></canvas></div>
                                            </div>
                                        </div>
                                        <div class="databox-right">
                                            <span class="databox-number palegreen">消费者保障</span>
                                            <div class="databox-text darkgray">质量问题,先行赔付！</div>
                                            <div class="databox-state bg-azure">
                                                <i class="fa fa-check"></i>
                                            </div>
                                        </div>
                                    </div>                   
                 
                 
                 <div class="databox radius-bordered databox-shadowed databox-graded">
                                        <div class="databox-left bg-lightred">
                                            <div class="databox-piechart">
                                                <div data-trackcolor="#f39e93" data-size="47" data-linewidth="3" data-animate="500" data-percent="42" data-linecap="butt" data-barcolor="#fff" class="easyPieChart" data-toggle="easypiechart" style="width: 47px; height: 47px; line-height: 47px;"><span class="white"><h3>实</h3></span><canvas height="47" width="47"></canvas></div>
                                            </div>
                                        </div>
                                        <div class="databox-right">
                                            <span class="databox-number lightred">服务商认证</span>
                                            <div class="databox-text darkgray">实名认证,更放心交易！</div>
                                            <div class="databox-state bg-azure">
                                                <i class="fa fa-check"></i>
                                            </div>
                                        </div>
                                    </div>                   

            
                
                {if $task['service_uid']}
                <div class="databox databox-xlg databox-halved radius-bordered databox-shadowed databox-vertical">
                                        <div class="databox-top bg-white padding-10">
                                            <div class="col-lg-4 col-sm-4 col-xs-4">
                                            {echo GetAvatarSimple($task['service_uid'],48,'image-circular bordered-3 bordered-palegreen')}
                                            </div>
                                            <div class="col-lg-8 col-sm-8 col-xs-8 text-align-left padding-10">
                                                <span class="databox-header carbon no-margin">任务客服</span>
                                                <span class="databox-text lightcarbon no-margin"> {echo $task['service_username']} </span>
                                            </div>
                                        </div>
                                        <div class="databox-bottom bg-white no-padding">
                                            <div class="databox-row row-12">
                                                <div class="databox-row row-6 no-padding">
                                                    <div class="databox-cell cell-12 no-padding text-align-center bordered-right bordered-platinum">
                                                        <span class="databox-number lightcarbon no-margin">电话：{echo $task['service_phone']}</span>
                                                    </div>
                                                </div>
                                                <div class="databox-row row-6 padding-10">
                                                    <button class="btn btn-palegreen btn-sm pull-right" onclick="dialogmessage('{echo $task['service_username']}');">站内联系</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                
            	{/if}
               
		 <div class="well"> 
			<table class="table table-hover">
                    <thead>
                        <tr>
                            <th>
                                <strong>推荐任务</strong>
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                    {if $newtask}
                    	{foreach $newtask $task}
                        <tr>
                            <td>
                                <p style="width:160px;height:18px;overflow: hidden;"><a href="/task/{echo $task['id']}" target="_blank"><span class="color_f60">￥{echo $task['money']/100}</span> {echo $task['subject']}</a></p>
                            </td>
                        </tr>
                        {/foreach}
           			{/if}
                    </tbody>
                </table>
        
        
        </div>
        
        <div class="well"> 
          <strong>推荐服务商</strong>
    		
               {if $hotuser}
                	{foreach $hotuser $user}
                       <div class="databox databox-graded">
                            <div class="databox-left" style="padding-top:8px">
                             <a href="/shop/{echo $user['uid']}" target="_blank">{echo GetAvatarSimple($user['uid'],48,'img-rounded')}</a>
                            </div>
                            <div class="databox-right padding-top-20 bg-whitesmoke">
                                <div class="databox-text darkgray"><a href="/shop/{echo $user['uid']}" target="_blank">{echo $user['username']}</a></div>
                                <div class="databox-text darkgray">
                                  {echo $user['provname']} {echo $user['cityname']} {echo $user['distname']}
                                </div>
                            </div>
                        </div>
                              
                    {/foreach}   
               {/if}
        </div>
      </div>
    </div>
  </div>
</div>
</div>

<script>
$(function(){
	GetDataMessage("{echo U('/post/message/list/id/'.$id)}");
});
</script>
{template Public:Page:footer}